Why `#import("dart:unittest")` can't run?

Posted by Freewind on Stack Overflow See other posts from Stack Overflow or by Freewind
Published on 2012-05-31T04:22:13Z Indexed on 2012/05/31 4:41 UTC
Read the original article Hit count: 439

Filed under:
|

I write some dart test code:

#import("dart:unittest");
main() {
  test('this is a test', () {
    int x = 2+3;
    expect(x).equals(5);
  });
}

It doesn't display any error in dart editor, but when I press the "run" button, it reports:

Do not know how to load 'dart:unittest''file:///home/freewind/dev/dart/editor
/samples/shuzu.org/test/model_test.dart': 
Error: line 1 pos 1: library handler failed
#import("dart:unittest");
^

I see there is a "dart:unittest" library in my dart-sdk. Why it can't be run?

© Stack Overflow or respective owner

Related posts about unit-testing

Related posts about dart